package com.example.appathon13;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

public class HomePage extends Activity implements OnClickListener{
	
	Button b1,b2,b3,b4,b5,b6,b7;
	public void onCreate(Bundle onSavedInstanceState){
		super.onCreate(onSavedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.homepage);
		
		b1 = (Button) findViewById(R.id.button1);
		b1.setOnClickListener(this);
		b2 = (Button) findViewById(R.id.button2);
		b2.setOnClickListener(this);
		b3 = (Button) findViewById(R.id.button3);
		b3.setOnClickListener(this);
		b4 = (Button) findViewById(R.id.button4);
		b4.setOnClickListener(this);
		b5 = (Button) findViewById(R.id.button5);
		b5.setOnClickListener(this);
		b6 = (Button) findViewById(R.id.button6);
		b6.setOnClickListener(this);
		b7 = (Button) findViewById(R.id.button7);
		b7.setOnClickListener(this);
	}
	
	public void onClick(View arg0) {
		switch(arg0.getId()){
		case R.id.button1:
			Intent i =new Intent(this,RoomListPage.class);
			startActivity(i);
			break;
		case R.id.button2:
			Intent i5 = new Intent(this, ReserveRoom.class);
			Bundle b = new Bundle(); b.putString("value1", "classroom"); i5.putExtras(b);
			startActivity(i5);
			break;
		case R.id.button3:
			Intent i6 = new Intent(this, ReserveRoom.class);
			Bundle b2 = new Bundle(); b2.putString("value1", "approval"); i6.putExtras(b2);
			startActivity(i6);
			break;
		case R.id.button4:
			Intent i7 = new Intent(this, ReserveRoom.class);
			Bundle b3 = new Bundle(); b3.putString("value1", "instant"); i7.putExtras(b3);
			startActivity(i7);
			break;
		case R.id.button5:
			Intent i2 = new Intent(this,EventsPage.class);
			startActivity(i2);
			break;
		case R.id.button6:
			Intent i3 = new Intent(this, BrowseSpace.class);
			startActivity(i3);
			break;
		case R.id.button7:
			Intent i4 = new Intent(this,RoomRequests.class);
			startActivity(i4);
			break;
		}
	}
}
